<html>
 <head>
    <title>Accounts-dates filter</title>
    <link rel='stylesheet' href='css/styles.css' type='text/css' />
    <link href="js/schema.js" type="application/json" rel="exhibit/data" />
    <link href="accounts.js" type="application/json" rel="exhibit/data" />
    
    <script src="js/daterange.js" type="text/javascript"></script>
    <script>
        var prm='';
        function myRowStyler(itemID, db, tr, index) {
            var id = tr.getAttribute('ex:itemid');
            var a = tr.rows[index+1].cells[1].getAttribute('ACCTID')
            a=escape(a)
            a=a.replace(/\+/g,"%2B");
            
            if (index == 0) {
                prm ='ACCTID='+a;
            } else {
                prm = prm +'&ACCTID='+a;
            }
        }
        function fixDT(dt) {
            dt=dt.value;
            var e = dt.split("/");
            return e[2]+e[0]+e[1];
        }
        function GoToURL(j) {
            var frm = window.document.forms['daterangeform'];
            var s='DTSTART='+fixDT(frm.minimumDate)+'&DTEND='+fixDT(frm.maximumDate)            
            this.location.href = j+'.html';
        }
    </script>

    <script src="http://static.simile.mit.edu/exhibit/api-2.1.0/exhibit-api.js"></script>
    <!-- script src="http://static.simile.mit.edu/exhibit/api-2.0/exhibit-api.js" type="text/javascript"></script -->
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 
</head> 
<body onload="date_selector.init(window.document.forms['daterangeform']);">
 <table><tr>
 <td width="10%"><a href="index.html">Home</a></td>
 <td width="50%"><a href="accounts.html">select different groups, accounts and/or statement dates</a></td>
 <td width="10%"><a href="http://code.google.com/p/3account/wiki/Getting_Started">Help</a></td>
 </tr></table>
 <h1>Accounts-dates filter</h1>





<form style="display:inline;" method="post" id="daterangeform" name="daterangeform">
  <table style="border-collapse:collapse;vertical-align:top;"
  cellpadding="0" cellspacing="0">
    <tr>
      <td>
        Select a date range between
        <div style="text-align:center;">
          <input type="text" name="minimumDate" style="width:75px;font-size:8pt;"
          value="MM/DD/YYYY">
          <input type="button" style="height:20px;width:20px;" value="..."
          onclick="date_selector.showDateSelector('minimumDate');">
          and
          <input type="text" name="maximumDate" style="width:75px;font-size:8pt;"
          value="MM/DD/YYYY">
          <input type="button" style="height:20px;width:20px;" value="..."
          onclick="date_selector.showDateSelector('maximumDate' );">
        </div>
        <div id="dateSelectorPane"></div>
      </td>
    </tr>
  </table>
</form>

<div ex:role="exhibit-collection" ex:itemTypes="account"></div>
    by default all accounts are selected. You can select individual accounts
    and/or groups, types, currencies:
    <table width="80%">
        <tr>
            <td>
<div style="display: none;"
     ex:role="view"
     ex:viewClass="Tabular"
     ex:showSummary="true"
     ex:columns=".ACCTID.accountGroup, .ACCTID, .label"
     ex:columnLabels="Account group, Account ID, label"
     ex:formats="list"
     ex:sortColumn="0"
                    ex:rowStyler="myRowStyler"
     ex:showToolbox="false">
    <table style="display: none;">
        <tr>
            <td><span ex:content=".ACCTID.accountGroup"></span></td>
            <td ex:ACCTID-content=".ACCTID"><span ex:content=".ACCTID"></span></td>
            <td><span ex:content=".label"></span></td>
        </tr>
    </table>
</div>
            </td>
            <td>
<div ex:role="facet" ex:expression=".ACCTID" ex:facetLabel="account"></div>
            </td>
            <td>
<div ex:role="facet" ex:expression=".ACCTID.accountGroup" ex:facetLabel="group"></div>
            </td>
            <td>
<div ex:role="facet" ex:expression=".aCCTTYPE" ex:facetLabel="type"></div>
            </td>
            <td>
<div ex:role="facet" ex:expression=".CURDEF" ex:facetLabel="currency" ex:sortMode="count"></div>
            </td>
        </tr>
    </table>
    and for the above selection show:

<table border="0">
<tr>
<td><input type="Button" name="Go to" value="        Accounts total           " onClick="GoToURL('accounttotals')"></td>
<td><input type="Button" name="Go to" value="        Assets position          " onClick="GoToURL('positions')"></td>
<td><input type="Button" name="Go to" value="     Investment transactions     " onClick="GoToURL('transactions')"></td>
<td><input type="Button" name="Go to" value="Checking/Credit-Card transactions" onClick="GoToURL('checking')"></td>
</tr>
</table>
 
 <script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-4428134-7");
pageTracker._trackPageview();
} catch(err) {}</script>
</body>
</html>
